#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/7/26 15:53
# @Author  : Chenmm
# @File    : register.py
# @Software: PyCharm

from fastapi import APIRouter, Depends
from core.database import db_getter
from sqlalchemy.ext.asyncio import AsyncSession
from apps.vadmin.auth.crud import UserDal
from .. import schemas



router = APIRouter()



@router.post("/api/register", summary="API 手机号密码注册", description="用户注册")
async def register(data: schemas.RegisterForm, db: AsyncSession = Depends(db_getter)):
    return await UserDal(db).register_user(data=data)